import React , { Component, Suspense, lazy } from 'react';

import { withRouter,NavLink,Switch,Redirect,Route} from 'react-router-dom';

// import Home from './views/Home';
// import Tabbak from './views/Tabbak';
// import NewsPage from './views/Tabbak/tab.jsx';
//
// import Tab from './views/Tab';
// import Page from './views/Page/index.jsx';


const Home = lazy(() => import('./views/Home'));
const Tabbak = lazy(() => import('./views/Tabbak'));
const NewsPage = lazy(() => import('./views/Tabbak/tab.jsx'));
const Tab = lazy(() => import('./views/Tab'));
const Page = lazy(() => import('./views/Page/index.jsx'));

const StorePage = lazy(() => import('./views/StorePage'));

const NewStore = lazy(() => import('./views/NewStore'));


const PageGx = lazy(() => import('./views/PageGx'));

const ChangeFu = lazy(() => import('./views/ChangeFu'));



class App extends Component {
    render(){
        return (
            <Suspense fallback={<div>Loading...</div>}>
                <Switch>
                    <Route exact path="/" component={Home} />
                    <Route path="/tabbak" component={Tabbak} />
                    <Route path="/newspage" component={NewsPage} />
                    <Route path="/tab" component={Tab} />
                    <Route path="/page" component={Page} />
                    <Route path="/newstore" component={NewStore} />
                    <Route path="/storepage" component={StorePage} />
                    <Route path="/pagegx" component={PageGx} />
                    <Route path="/changefu" component={ChangeFu} />

                    <Redirect to="/"/>
                </Switch>
            </Suspense>
        );
    }
}
export default App;
